|
|
|
| Table 29.2 Predefined Placeholders on a Data Report | | Code | Description | | %p | Current page number | | %P | Total number of pages | | %d | Current date (short format); for example, 5/24/98 | | %D | Current date (long format); for example, Sunday, May 24, 1998 | | %t | Current time (short format); for example, 16:10 | | %T | Current time (long format); for example, 4:10:00 PM | | %i | Report title (string stored in the Title property of the DataReport object) |
|
|
|
|
|
|
To use one of these fields, simply place a RptLabel control on the report and set its Caption property to include the placeholder you want. For example, if you want to add a page number to the bottom of the page, draw a label in the Page Footer section and set its caption to the following string: |
|
|
|
|
|
|
|
|
Run the report, and the Data Report automatically replaces the placeholders with the proper information, as shown in Figure 29.6. |
|
|
|
|
|
|
|
|
Figure 29.6
A page counter has been added to the sample report. |
|
|
|
|
|
|
|
|
If you just want to use one of the placeholders by itself, without any of your own text, there is a quick way to add it to the report. Simply right-click the report, and choose Insert Control from the context-sensitive menu that appears. You can select from any of the predefined fields, as well as the other available report controls. |
|
|
|
|
|
|
|
|
Graphical shapes and images do not add any functionality to your report, but they make it look nicer, so you can use them to highlight or visually organize certain information. Three controls allow you to add these elements: the RptImage, RptLine, and RptShape controls. |
|
|
|
|
|